﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jzy;

namespace ECommerce.Model.Product
{
    public partial class ECProductCommentInfo : EntityBase
    {
        private const string TABLE_NAME = "ECProductComment";
        private const string INSERT_SQL = "insert into ECProductComment ( [ID], [MemberID], [MemberLoginName], [ProductID], [Content], [InputTime], [Price], [Taste], [Sculpt], [Score], [IsDisplay]) values ( @ID, @MemberID, @MemberLoginName, @ProductID, @Content, @InputTime, @Price, @Taste, @Sculpt, @Score, @IsDisplay)";
        private const string UPDATE_SQL = "update ECProductComment set  [ID] = @ID, [MemberID] = @MemberID, [MemberLoginName] = @MemberLoginName, [ProductID] = @ProductID, [Content] = @Content, [InputTime] = @InputTime, [Price] = @Price, [Taste] = @Taste, [Sculpt] = @Sculpt, [Score] = @Score, [IsDisplay] = @IsDisplay where ID = @ID";
        /// <summary>
        /// PK
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 评论人ID
        /// </summary>
        public Int32 MemberID
        {
            get;
            set;
        }
        /// <summary>
        /// 评论人Name
        /// </summary>
        public String MemberLoginName
        {
            get;
            set;
        }
        /// <summary>
        /// 产品ID
        /// </summary>
        public Int32 ProductID
        {
            get;
            set;
        }
        /// <summary>
        /// 下评论内容
        /// </summary>
        public String Content
        {
            get;
            set;
        }
        /// <summary>
        /// 评论时间
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        /// <summary>
        /// 价格
        /// </summary>
        public String Price
        {
            get;
            set;
        }
        /// <summary>
        /// 口味
        /// </summary>
        public String Taste
        {
            get;
            set;
        }
        /// <summary>
        /// 造型
        /// </summary>
        public String Sculpt
        {
            get;
            set;
        }
        /// <summary>
        /// 评分
        /// </summary>
        public Int32 Score
        {
            get;
            set;
        }
        /// <summary>
        /// 是否显示
        /// </summary>
        public Boolean IsDisplay
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "memberid":
                    this.MemberID = (Int32)value;
                    break;
                case "memberloginname":
                    this.MemberLoginName = (String)value;
                    break;
                case "productid":
                    this.ProductID = (Int32)value;
                    break;
                case "content":
                    this.Content = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
                case "price":
                    this.Price = (String)value;
                    break;
                case "taste":
                    this.Taste = (String)value;
                    break;
                case "sculpt":
                    this.Sculpt = (String)value;
                    break;
                case "score":
                    this.Score = (Int32)value;
                    break;
                case "isdisplay":
                    this.IsDisplay = (Boolean)value;
                    break;
            }
        }
    }



}
